#include "gtkprivate.h"
#include "gtktypebuiltins.h"
#include "gtksizerequest.h"
-#include "gtkstylecontextprivate.h"
#include "gtkwidgetprivate.h"
#include "config.h"
-#include "gtkstylecontextprivate.h"
+#include "gtkcssnodeprivate.h"
#include "gtkcssnumbervalueprivate.h"
#include "gtkbuiltiniconprivate.h"
#include "gtkwidgetprivate.h"
int *minimum_baseline,
int *natural_baseline)
{
- GtkCssValue *icon_size;
+ GtkCssStyle *style;
- icon_size = _gtk_style_context_peek_property (gtk_widget_get_style_context (widget), GTK_CSS_PROPERTY_ICON_SIZE);
- *minimum = *natural = _gtk_css_number_value_get (icon_size, 100);
+ style = gtk_css_node_get_style (gtk_widget_get_css_node (widget));
+
+ *minimum = *natural = _gtk_css_number_value_get (style->icon->icon_size, 100);
}
static void
#include "gtkprivate.h"
#include "gtkrendericonprivate.h"
#include "gtksnapshot.h"
-#include "gtkstylecontextprivate.h"
#include "gtkwidgetprivate.h"
#include "gtkgestureclick.h"
#include "gtkgesturedrag.h"
#include "gtklabel.h"
#include "gtkprivate.h"
#include "gtkshortcuttrigger.h"
-#include "gtkstylecontextprivate.h"
+#include "gtkcssnodeprivate.h"
#include "gtkwidgetprivate.h"
#include "gtkmodelbuttonprivate.h"
#include "gtkpopovermenu.h"
#include "gtkprivate.h"
#include "gtksnapshot.h"
-#include "gtkstylecontextprivate.h"
#include "gtkwidgetprivate.h"
#include "gtkeventcontrollerkey.h"
#include "gtknative.h"
#include "gtkcssinheritvalueprivate.h"
#include "gtkcssinitialvalueprivate.h"
-#include "gtkstylecontextprivate.h"
+#include "gtkcssstyleprivate.h"
struct _GtkCssValue {
GTK_CSS_VALUE_BASE
#include "gtkcssshorthandpropertyprivate.h"
#include "gtksettingsprivate.h"
#include "gtkstyleprovider.h"
-#include "gtkstylecontextprivate.h"
#include "gtkstylepropertyprivate.h"
#include "gtkstyleproviderprivate.h"
#include "gtkmarshalers.h"
#include "gtkcssnumbervalueprivate.h"
#include "gtkcsscolorvalueprivate.h"
#include "gtksnapshotprivate.h"
-#include "gtkstylecontextprivate.h"
#include "gtkpango.h"
#include "gsk/gskcairoblurprivate.h"
#include "gtkprogressbar.h"
#include "gtksettings.h"
#include "gtksnapshot.h"
-#include "gtkstylecontextprivate.h"
#include "gtktextprivate.h"
#include "gtktexthandleprivate.h"
#include "gtktextutil.h"
#include "gtkmarshalers.h"
#include "gtkmain.h"
#include "gtkprivate.h"
-#include "gtkstylecontextprivate.h"
#include "gtkwidgetprivate.h"
#include <string.h>
#include "gtkshow.h"
#include "gtkmain.h"
#include "gtkscrollable.h"
-#include "gtkstylecontextprivate.h"
#include "gtkpopover.h"
#include "gtkrevealer.h"
#include "gtkspinner.h"
#include "gtkscrolledwindow.h"
#include "gtksearchentry.h"
#include "gtkspinbutton.h"
-#include "gtkstylecontextprivate.h"
#include "gtktextview.h"
#include "gtkwidgetprivate.h"
#include "gtksettings.h"
#include "gtkintl.h"
#include "gtkbuildable.h"
#include "gtkwidgetprivate.h"
-#include "gtkstylecontextprivate.h"
-#include "gtkcssstylepropertyprivate.h"
#include "gtklabel.h"
/**
#include "gtkorientable.h"
#include "gtkprivate.h"
#include "gtksizerequest.h"
-#include "gtkstylecontextprivate.h"
+#include "gtkcssnodeprivate.h"
#include "gtkwidgetprivate.h"
#include "gtkcssenumvalueprivate.h"
#include "gtkcssnumbervalueprivate.h"
#include "gtkcssstyleprivate.h"
-#include "gtkcssstylepropertyprivate.h"
#include "gtkcsstransientnodeprivate.h"
#include "gtkiconthemeprivate.h"
#include "gtkrendericonprivate.h"
#include "gtkimageprivate.h"
-#include "gtkcssstylepropertyprivate.h"
#include "gtkiconhelperprivate.h"
#include "gtkicontheme.h"
#include "gtkintl.h"
#include "gtkbuildable.h"
#include "gtkbuilderprivate.h"
-#include "gtkcssstylepropertyprivate.h"
#include "gtkeventcontrollermotion.h"
#include "gtkeventcontrollerfocus.h"
#include "gtkgesturedrag.h"
#include "gtkbinlayout.h"
#include "gtkbuildable.h"
#include "gtkbuilderprivate.h"
-#include "gtkcssstylepropertyprivate.h"
#include "gtkgizmoprivate.h"
#include "gtkintl.h"
#include "gtklevelbar.h"
#include "gtkmarshalers.h"
#include "gtkorientable.h"
-#include "gtkstylecontextprivate.h"
+#include "gtkcssnodeprivate.h"
#include "gtktypebuiltins.h"
#include "gtkwidgetprivate.h"
#include "gtkscrollable.h"
#include "gtksingleselection.h"
#include "gtksnapshot.h"
-#include "gtkstylecontextprivate.h"
#include "gtktypebuiltins.h"
#include "gtkwidgetprivate.h"
#include "gtkicontheme.h"
#include "gtkmain.h"
#include "gtksettings.h"
-#include "gtkstylecontextprivate.h"
#include "gtkdialogprivate.h"
#include "gtkgestureclick.h"
#include "gtkmodelbuttonprivate.h"
#include "gtkboxlayout.h"
#include "gtkbuildable.h"
#include "gtkbutton.h"
-#include "gtkcssstylepropertyprivate.h"
#include "gtkdroptarget.h"
#include "gtkdragicon.h"
#include "gtkdropcontrollermotion.h"
#include "gtkpaned.h"
#include "gtkcssboxesprivate.h"
-#include "gtkcssstylepropertyprivate.h"
#include "gtkeventcontrollermotion.h"
#include "gtkgesturepan.h"
#include "gtkgesturesingle.h"
#include "gtkorientable.h"
#include "gtkprivate.h"
#include "gtkrendericonprivate.h"
-#include "gtkstylecontextprivate.h"
+#include "gtkcssnodeprivate.h"
#include "gtktypebuiltins.h"
#include "gtkwidgetprivate.h"
#include "gtkcssboxesprivate.h"
#include "gtkprivate.h"
#include "gtkwidgetprivate.h"
#include "gtkcsspositionvalueprivate.h"
-#include "gtkstylecontextprivate.h"
+#include "gtkcssnodeprivate.h"
/**
#include "gtkprogressbar.h"
#include "gtkboxlayout.h"
-#include "gtkcssnumbervalueprivate.h"
-#include "gtkcssstylepropertyprivate.h"
#include "gtkgizmoprivate.h"
#include "gtkintl.h"
#include "gtklabel.h"
#include "gtkorientable.h"
#include "gtkprogresstrackerprivate.h"
#include "gtkprivate.h"
-#include "gtkstylecontextprivate.h"
#include "gtkwidgetprivate.h"
#include <string.h>
#include "gtkcsscornervalueprivate.h"
#include "gtkcssnumbervalueprivate.h"
#include "gtkcsstypesprivate.h"
-#include "gtkstylecontextprivate.h"
#include <string.h>
#include "gtkorientable.h"
#include "gtkprivate.h"
#include "gtkrangeprivate.h"
-#include "gtkstylecontextprivate.h"
-#include "gtkstylepropertyprivate.h"
#include "gtktypebuiltins.h"
#include "gtkwidgetprivate.h"
#include "gtkbox.h"
#include "gtkbutton.h"
#include "gtkbuttonprivate.h"
-#include "gtkcssstylepropertyprivate.h"
#include "gtkeditable.h"
#include "gtkcelleditable.h"
#include "gtkimage.h"
#include "gtkorientable.h"
#include "gtkprivate.h"
#include "gtksettings.h"
-#include "gtkstylecontextprivate.h"
#include "gtktypebuiltins.h"
#include "gtkwidgetprivate.h"
#include "gtkboxlayout.h"
#include "gtkimage.h"
#include "gtkintl.h"
#include "gtkprivate.h"
-#include "gtkstylecontextprivate.h"
+#include "gtkcssnodeprivate.h"
#include "gtkwidgetprivate.h"
#include "gtkcssnumbervalueprivate.h"
#include "gtkrendericonprivate.h"
#include "gtkprivate.h"
#include "gtkprogresstrackerprivate.h"
#include "gtksettingsprivate.h"
-#include "gtkstylecontextprivate.h"
#include "gtkwidgetprivate.h"
typedef struct _GtkSwitchClass GtkSwitchClass;
#include "gtkwidgetprivate.h"
#include "gtkrendericonprivate.h"
#include "gtkcssboxesimplprivate.h"
-#include "gtkcssnumbervalueprivate.h"
-#include "gtkstylecontextprivate.h"
+#include "gtkcssnodeprivate.h"
#include "gtknativeprivate.h"
#include "gtkintl.h"
static void
gtk_text_handle_get_padding (GtkTextHandle *handle,
- GtkBorder *border)
+ GtkBorder *padding)
{
GtkWidget *widget = GTK_WIDGET (handle);
- GtkStyleContext *context;
-
- context = gtk_widget_get_style_context (widget);
+ GtkCssStyle *style = gtk_css_node_get_style (gtk_widget_get_css_node (widget));
- border->left = _gtk_css_number_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_PADDING_LEFT), 100);
- border->right = _gtk_css_number_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_PADDING_RIGHT), 100);
- border->top = _gtk_css_number_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_PADDING_TOP), 100);
- border->bottom = _gtk_css_number_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_PADDING_BOTTOM), 100);
+ padding->left = _gtk_css_number_value_get (style->size->padding_left, 100);
+ padding->right = _gtk_css_number_value_get (style->size->padding_right, 100);
+ padding->top = _gtk_css_number_value_get (style->size->padding_top, 100);
+ padding->bottom = _gtk_css_number_value_get (style->size->padding_bottom, 100);
}
static void
#include "gtkintl.h"
#include "gtkwidgetprivate.h"
#include "gtkcssstyleprivate.h"
-#include "gtkstylepropertyprivate.h"
#include "gtkcsscolorvalueprivate.h"
#define DRAG_ICON_MAX_WIDTH 250
GtkTextAttributes *values)
{
GtkCssStyle *style;
- GtkStyleContext *context;
const GdkRGBA black = { 0, };
if (!values->appearance.bg_rgba)
if (!values->appearance.fg_rgba)
values->appearance.fg_rgba = gdk_rgba_copy (&black);
- context = gtk_widget_get_style_context (widget);
- style = gtk_style_context_lookup_style (context);
+ style = gtk_css_node_get_style (gtk_widget_get_css_node (widget));
*values->appearance.bg_rgba = *gtk_css_color_value_get_rgba (style->background->background_color);
*values->appearance.fg_rgba = *gtk_css_color_value_get_rgba (style->core->color);
#include "gtktypebuiltins.h"
#include "gtktextviewchildprivate.h"
#include "gtktexthandleprivate.h"
-#include "gtkcssstylepropertyprivate.h"
+#include "gtkstylecontextprivate.h"
#include "gtkpopover.h"
#include "gtkmagnifierprivate.h"
#include "gtkemojichooser.h"
gtk_text_view_set_attributes_from_style (GtkTextView *text_view,
GtkTextAttributes *values)
{
- GtkStyleContext *context;
+ GtkCssStyle *style;
const GdkRGBA black = { 0, };
const GdkRGBA *color;
if (!values->appearance.fg_rgba)
values->appearance.fg_rgba = gdk_rgba_copy (&black);
- context = gtk_widget_get_style_context (GTK_WIDGET (text_view));
+ style = gtk_css_node_get_style (gtk_widget_get_css_node (GTK_WIDGET (text_view)));
- color = gtk_css_color_value_get_rgba (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BACKGROUND_COLOR));
+ color = gtk_css_color_value_get_rgba (style->background->background_color);
*values->appearance.bg_rgba = *color;
- color = gtk_css_color_value_get_rgba (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_COLOR));
+ color = gtk_css_color_value_get_rgba (style->core->color);
*values->appearance.fg_rgba = *color;
if (values->font)
pango_font_description_free (values->font);
- values->font = gtk_css_style_get_pango_font (gtk_style_context_lookup_style (context));
+ values->font = gtk_css_style_get_pango_font (style);
}
static void
#include "gtkcellrenderer.h"
#include "gtkcssnumbervalueprivate.h"
#include "gtkcsscolorvalueprivate.h"
-#include "gtkcssstylepropertyprivate.h"
#include "gtkdragsource.h"
#include "gtkdragicon.h"
#include "gtkdroptargetasync.h"
#include "gtkcsspositionvalueprivate.h"
#include "gtkcssfontvariationsvalueprivate.h"
#include "gtkcssnumbervalueprivate.h"
-#include "gtkcssstylepropertyprivate.h"
#include "gtkcsswidgetnodeprivate.h"
#include "gtkdebug.h"
#include "gtkgesturedrag.h"
#include "gtkcsscornervalueprivate.h"
#include "gtkcsscolorvalueprivate.h"
#include "gtkcssshadowvalueprivate.h"
-#include "gtkcssstylepropertyprivate.h"
#include "gtkdroptargetasync.h"
#include "gtkeventcontrollerlegacy.h"
#include "gtkeventcontrollerkey.h"